Goals from Robert Earnshaw and Leo Fortune West put Cardiff in the driving seat in their Second Division play-off clash with Stoke.
Stoke mounted a late siege on the Cardiff goal and Deon Burton gave the Potters a lifeline but the Bluebirds - at home in the second-leg - have the advantage.
However, the game was marred by a five-minute stoppage in the second half after an outbreak of crowd trouble.
But there was no doubt that on the pitch the visitors were the superior team and the quickest to find their rhythm.
Former Stoke midfielder Graham Kavanagh picked out Peter Thorne - another former Stoke player - after four minutes, but Potters goalkeeper Neil Cutler easily saved.
The early warning was not heeded by Stoke's defence and Cardiff soon took the lead.
Earnshaw picked up the ball in midfield and played a simple one-two with Thorne before coolly slotting home from 12 yards.
Stoke might have levelled before the break but Marc Goodfellow's shot was saved by Neil Alexander and then Bjarni Gudjonsson shot wide when unmarked 10 yards out.
Fortune-West could have doubled Cardiff's advantage but he flicked a Mark Bonner header onto the post.
Stoke started the second half brightly and James O'Connor forced a superb one-handed save from Alexander after a mazy 20-yard run.
However, the game slipped further from their reach on the hour mark as the Bluebirds scored an all-important second goal.
Spencer Prior rose perfectly to meet a Kavanagh cross and although his header hit the post the rebound fell kindly to Fortune-West to nod home from close range.
Crowd trouble
The goal sparked ugly scenes amongst the Stoke crowd and referee Anthony Leake was forced to stop the game for five minutes as police took control of the situation.
When the game restarted both teams had chances - Goodfellow brought another sharp save out of Cardiff keeper Alexander and Earnshaw was put clean through for Cardiff but could not beat Cutler.
But Stoke substitute Burton gave the home side hope for the return leg in the 84th minute with a half-volley.
And he might have scored an equaliser but his close-range header was scrambled clear.
Key moments
12 mins: Earnshaw scores for Cardiff
59 mins: Fortune-West doubles Cardiff's lead
84 mins: Burton scores for Stoke